<?php


// 转盘活动管理
namespace Admin\Controller;

class TurntableController extends BaseManageController {
	/**
	*控制操作的模型表
	*/
	protected $modelName = 'MallActivityTurntable';	

	/**
	*删除类型的设置 true|直接删除， false|设置数据状态
	*/	
	protected $is_del	= false;

	/**
	*跳转的Url
	*/
	protected $jumpAct	= 'Turntable/index';

	/**
	*操作index的前置操作
	*---设置数据筛选条件---
	*/
	public function _before_index()
	{
		$map = array();//筛选条件
        $map['status'] = array('egt',0);
        $this->where = $map;
	}


	public function prize($id)
	{
		$id = (int)$id;
		$map = [
			'object_id' 	=> (int) $id,
			'prize_level'	=> ['$in' => [1,2,3,4,5]],
		];
		$data = $this->model->where(['id' => $id])->find();
		$list = service('Mall/TurntableUserAction')->where($map)->select();
		$this->assign('_list', $list);
		$this->assign('data', $data);

		$this->display();
	}

	



}








